package com.alibaba.boot.dubbo.demo.consumer.controller;

import java.util.List;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.boot.dubbo.demo.consumer.UserService;
import com.alibaba.boot.dubbo.demo.model.User;
import com.alibaba.dubbo.config.annotation.Reference;

@RestController
@RequestMapping(value = "/user")
public class UserController {
   /* @Reference(version = "${demo.service.version}",
            application = "${dubbo.application.id}")*/
	@Reference(version = "${demo.service.version}")
    private UserService userService;

    @RequestMapping("/findAll")
    public List<User> findAllUsers() {
        return userService.findAllUsers();
    }
}
